<?php
class Measure extends CI_Model 
{
    function get_all($limit=10000, $offset=0)
    {
            $this->db->from('measure');
            $this->db->order_by("Name", "asc");
            $this->db->limit($limit);
            $this->db->offset($offset);
            return $this->db->get();		
    }
    function get_info($measure_id)
	{
		$this->db->from('measure');	
		$this->db->where('measure_id',$measure_id);
		$query = $this->db->get();
		
		if($query->num_rows()==1)
		{
			return $query->row();
		}
		else
		{
			//Get empty base parent object, as $measure_id is NOT an measure			
			return $this->lang->line('error_unknown');
		}
	}

}
?>
